About respawn modding
Here's everything I gathered so far in my attempts to create a respawn mod. Everyone feel free to add any additional information. For now all the information listed here are taken and edited in the maps folder and files. You can join the discussion here : http://forums.ubi.com/showthread.php/832413-A-question-for-the-Modders-out-there Spawn mechanics -'Monster spawns' are controlled by "Trigger" events. Triggers are in fact doubles. There is the one you activate (most often by just walking on a tile) which will target and activate a second one somewhere else (so on another tile) making the monster spawn. Apparently, from all my tests that far, it's not possible to make two monsters or more spawn with the same trigger neither on the same tile, I have to investigate further. Another thing based on this : you absolutely need on pair of trigger for every monster you want to spawn. The initial trigger(s) can all be on the same tile but all the spawn triggers must be on diferent tiles. For example this is extracted of the Spider_Lair_1 file : ' ''>>>ID of the "trigger" trigger. 0 RequiredState="NONE" ActivateCount="1" /> What in Hell can be this ActivateCount is my biggest question there. To 2,3,-1 nothing happened. To 30 game completely crashed in firework style. With these datas (and the pack coming along I cut, didn't want for the thing to become unreadable here) you can basically spawn absolutely any creature everywhere. This being said, in regard of respawn : you have to understand that absolutely every mechanism of the environment (spawns, doors, levers, dialogs, whatever...) is a trigger. Here is where things get a bit tricky. Monster spawns, like absolutely every trigger, get a specified and unique ID (a number). Problem is that monster_spawn triggers have apparently some kind of "one use only" ID. So if I create the monster_spawn ID="x" and trigger it, ID="x" will never ever be able to trigger another spawn (or anything else I think). Your savegame keep in mind somewhere that monster_spawn ID="x" already happened and must never happened again. Possible way to create limited respawn so far I found some interesting code in the Lighthouse_3 map : 0 '''CONDITIONAL_TRIGGER So it's possible to build conditional trigger. The two conditional datas, 20 and 22, are the trigger ID of the two buttons you must push down to activate the teleporter ("23" Extra="ON") to lvl 4. So, still theorically, we could use for CONDITIONAL_DATA the IDs of spawn triggers and find a way to replace the BUTTON_DOWN mention. We should then be able to create (as long as necessary) chains of respawn, next spawn couldn't be triggered as long as the first has not been. Plus I think I figured globally how to make triggers work through diferent map, like triggering something on world map from a city for example. For this the "Extra" section of the code should be granted with the path of the targeted map, then the targeted spawn built in said targeted map. Test still needed, first result coming soon. This solution would allow to build not an infinite respawn, not time base, but a very long chain of respawns would work just as such, prevent world voidening, prevent grinding, could allow to set on different respawn creatures and locations every time, could allow to create some surprises and challenges ("Oh crap, where are these elites from ?!", "Spider Queens invasion in Sorpigal, must protect inhabitants !"). Category:Creating Mods